package com.bootdo.core.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.bootdo.core.dao.GameBoutDao;
import com.bootdo.core.domain.GameBoutDO;
import com.bootdo.core.service.GameBoutService;



@Service
public class GameBoutServiceImpl implements GameBoutService {
	@Autowired
	private GameBoutDao gameBoutDao;
	
	@Override
	public GameBoutDO get(Long id){
		return gameBoutDao.get(id);
	}
	
	@Override
	public List<GameBoutDO> list(Map<String, Object> map){
		List<GameBoutDO> list = gameBoutDao.list(map);
		for(GameBoutDO gameBoutDOObject:list) {
			gameBoutDOObject.setGameTypeExplain(gameBoutDOObject.getGameType().getDesc());
			gameBoutDOObject.setStatusExplain(gameBoutDOObject.getStatus().getDesc());
		}
		return list;
	}
	
	@Override
	public int count(Map<String, Object> map){
		return gameBoutDao.count(map);
	}
	
	@Override
	public int save(GameBoutDO gameBout){
		return gameBoutDao.save(gameBout);
	}
	
	@Override
	public int update(GameBoutDO gameBout){
		return gameBoutDao.update(gameBout);
	}
	
	@Override
	public int remove(Long id){
		return gameBoutDao.remove(id);
	}
	
	@Override
	public int batchRemove(Long[] ids){
		return gameBoutDao.batchRemove(ids);
	}
	
}
